package com.vitabuybuy.tv.dto;

import com.vitabuybuy.tv.utils.LanaugeUtils;

import java.util.List;

/**
 * 作者：SimGa
 * 日期：2021/1/15
 * 时间：17:25
 * 包名：com.vitabuybuy.tv.dto
 */
public class AfterSaleListDto {

    private String number;
    /**
     * product : {"thumbnail":"http://106.55.47.138/attachment/png/3598/1575_28558.png","name":"上衣","id":87}
     * goods : {"image":"http://106.55.47.138/attachment/png/3598/1575_28558.png","id":345}
     * id : 659
     * specifications : {"EN":"Black M","CN":"黑 中","MA":"Hitam Normal"}
     */

    private ItemBean item;
    private double amount;
    private int id;
    /**
     * name : puma旗舰店
     * id : 60
     */

    private StoreBean store;
    private String type;
    private String status;

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public ItemBean getItem() {
        return item;
    }

    public void setItem(ItemBean item) {
        this.item = item;
    }

    public double getAmount() {
        return amount;
    }

    public void setAmount(double amount) {
        this.amount = amount;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public StoreBean getStore() {
        return store;
    }

    public void setStore(StoreBean store) {
        this.store = store;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public static class ItemBean {
        /**
         * thumbnail : http://106.55.47.138/attachment/png/3598/1575_28558.png
         * name : 上衣
         * id : 87
         */

        private ProductBean product;
        /**
         * image : http://106.55.47.138/attachment/png/3598/1575_28558.png
         * id : 345
         */

        private GoodsBean goods;
        private int id;
        private String specifications;

        public ProductBean getProduct() {
            return product;
        }

        public void setProduct(ProductBean product) {
            this.product = product;
        }

        public GoodsBean getGoods() {
            return goods;
        }

        public void setGoods(GoodsBean goods) {
            this.goods = goods;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getSpecifications() {
            String[] split = specifications.split(";");
            specifications = "";
            for (String spec : split) {
                String str = LanaugeUtils.returnStrByLocation(spec);
                specifications = specifications.concat(str).concat(";");
            }
            return specifications.isEmpty() ? specifications : specifications.substring(0, specifications.length() - 1);
        }

        public void setSpecifications(String specifications) {
            this.specifications = specifications;
        }

        public static class ProductBean {
            private String thumbnail;
            private String name;
            private int id;

            public String getThumbnail() {
                return thumbnail;
            }

            public void setThumbnail(String thumbnail) {
                this.thumbnail = thumbnail;
            }

            public String getName() {
                return LanaugeUtils.returnStrByLocation(name);
            }

            public void setName(String name) {
                this.name = name;
            }

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }
        }

        public static class GoodsBean {
            private String image;
            private int id;

            public String getImage() {
                return image;
            }

            public void setImage(String image) {
                this.image = image;
            }

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }
        }
    }

    public static class StoreBean {
        private String name;
        private int id;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }
    }
}
